
<tr id="tr_birthday">
	<th id="th_birthday">{lang babyinfo:birth_name}</th>
	<td id="td_birthday"><select id="birthyear" name="birthyear" class="ps" onchange="showbirthday();" tabindex="1">
		<option value="-1">年份</option>
		<!--{loop $years $year}-->
		<option value="$year" {if $birthyear== $year} selected="selected"{/if}>$year</option>
		<!--{/loop}-->
	</select> <select id="birthmonth" name="birthmonth" class="ps" onchange="showbirthday();" tabindex="2">
		<option value="-1">月份</option>
		<!--{loop $months $month}-->
		<option value="$month" {if $birthmonth== $month} selected="selected"{/if}>$month</option>
		<!--{/loop}-->
	</select> <select id="birthday" name="birthday" tabindex="2">
		<option value="-1">日期</option>
		<!--{loop $days $day}-->
		<option value="$day" {if $birthday== $day} selected="selected"{/if}>$day</option>
		<!--{/loop}-->
	</select></td>
	<td class="p">&nbsp;</td>
</tr>

<tr id="tr_prepare_pregnancy">
	<th id="th_prepare_pregnancy">{lang babyinfo:prepare_pregnancy}</th>
	<td id="td_prepare_pregnancy">
		<input type="checkbox" name="prepare_pregnancy" value="1"  id="prepare_pregnancy" {if $prepare_pregnancy } checked{/if} /><label for="prepare_pregnancy">{lang babyinfo:prepare_pregnancy}</label>
	</td>
	<td class="p">&nbsp;</td>
</tr>


<tr id="tr_email">
	<th id="th_email">{lang babyinfo:email}</th>
	<td id="td_email">$email&nbsp;&nbsp;&nbsp;&nbsp;({lang babyinfo:email_notice})</td>
	<td class="p">&nbsp;</td>
</tr>

<tr id="tr_interest">
	<th id="tr_subscribe">{lang babyinfo:subscribe}</th>
	<td id="td_subscribe">
		<input type="checkbox" name="yuer_weekly" value="1"  id="yuer_weekly" {if $yuer_weekly } checked {/if}/><label for="yuer_weekly">{lang babyinfo:yuer_weekly}</label>
		&nbsp;&nbsp;&nbsp;&nbsp;<label>{lang babyinfo:receive_freq}</label>
		<input type="radio" value="1" name ="yuer_receive_freq" id="radio1" {if $yuer_receive_freq == 1 } checked="true"{/if}/><label for="radio1">{lang babyinfo:receive_daily}</label>
		<input type="radio" value="2" name ="yuer_receive_freq"  id="radio2" {if $yuer_receive_freq == 2 } checked="true"{/if}/><label for="radio2">{lang babyinfo:receive_weekly}</label>
	</td>
	<td class="p">&nbsp;</td>
</tr>

<tr id="tr_nick_name">
	<th id="th_realname">{lang babyinfo:nick_name}</th>
	<td id="td_realname"><input type="text" name="nick_name" class="px" value="$nick_name" tabindex="1" />
	<div class="rq mtn" id="showerror_nick_name"></div>
	<p class="d"></p>
	</td>
	<td class="p">&nbsp;</td>
</tr>

<tr id="tr_name">
	<th id="th_realname">{lang babyinfo:name}</th>
	<td id="td_realname"><input type="text" name="name" class="px" value="$name" tabindex="1" />
	<div class="rq mtn" id="showerror_name"></div>
	<p class="d"></p>
	</td>
	<td class="p">&nbsp;</td>
</tr>

<tr id="tr_gender">
	<th id="th_gender">{lang babyinfo:gender}</th>
	<td id="td_gender"><select name="gender" id="gender" class="ps" tabindex="1">
		<option value="0" {if $gender== 0} selected="selected"{/if}>保密</option>
		<option value="1" {if $gender== 1} selected="selected"{/if}>男</option>
		<option value="2" {if $gender== 2} selected="selected"{/if}>女</option>
	</select></td>
	<td class="p">&nbsp;</td>
</tr>

<tr id="tr_fathername">
	<th id="th_fathername">{lang babyinfo:fathername}</th>
	<td id="td_fathername"><input type="text" name="father_name" class="px" value="$father_name" tabindex="10" />
	<div class="rq mtn" id="showerror_name"></div>
	<p class="d"></p>
	</td>
	<td class="p">&nbsp;</td>
</tr>

<tr id="tr_mothername">
	<th id="th_mothername">{lang babyinfo:mothername}</th>
	<td id="td_mothername"><input type="text" name="mother_name" class="px" value="$mother_name" tabindex="11" />
	<div class="rq mtn" id="showerror_name"></div>
	<p class="d"></p>
	</td>
	<td class="p">&nbsp;</td>
</tr>

<!--{if $message }-->
<tr>
	<td colspan="3"><span style="font-color: red;">$message</span></td>
</tr>
<!--{/if}-->

<tr>
	<th>&nbsp;</th>
	<td colspan="2"><input type="hidden" name="profilesubmit" value="true" />
	<button type="submit" name="profilesubmitbtn" id="profilesubmitbtn" value="true" class="pn pnc" onclick="onsubmitbabyinfo();">
	<strong>保存</strong></button>
	<span id="submit_result" class="rq"></span></td>
</tr>


<script type="text/javascript">
function onsubmitbabyinfo(){
	
}
function showbirthday(){
	var el = $('birthday');
	var birthday = el.value;
	el.length=0;
	el.options.add(new Option('日期', ''));
	for(var i=0;i<28;i++){
		el.options.add(new Option(i+1, i+1));
	}
	if($('birthmonth').value != "2"){
		el.options.add(new Option(29, 29));
		el.options.add(new Option(30, 30));
		switch($('birthmonth').value){
			case "1":
			case "3":
			case "5":
			case "7":
			case "8":
			case "10":
			case "12":{
				el.options.add(new Option(31, 31));
			}
		}
	} else if($('birthyear').value!="") {
		var nbirthyear=$('birthyear').value;
		if(nbirthyear%400==0 || (nbirthyear%4==0 && nbirthyear%100!=0)) {
			el.options.add(new Option(29, 29));
		}
	}
	el.value = birthday;
}
</script>